<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Fangs;
use App\Models\Node;



class IndexController extends Controller
{
    //
    public function index(){
        //获取用户对应的权限
        $auth = session('admin.auth');
		//读取菜单
        $menuData = (new Node)->treeData($auth);
        return view('admin.index.index',compact('menuData'));
    }


    //欢迎页显示
    public function welcome(){
        //查询出房源的数量信息
        $data = (new Fangs())->getFangStatusCount();
        return view('admin.index.welcome',compact('data'));
    }




}
